﻿using EPiMVC.Templates.Web.PageTypes.Tabs;
using EPiServer.Core;
using EPiServer.SpecializedProperties;
using PageTypeBuilder;

namespace EPiMVC.Templates.Web.PageTypes
{
    [PageType(Name = "Start page", AvailablePageTypes = new [] { typeof(StandardPage) })]
    public class StartPage : PublicPage
    {
        [PageTypeProperty(Type = typeof(PropertyImageUrl), Required = true,
            EditCaption = "Logotype", Tab = typeof(GlobalContentSettings))]
        public virtual string LogotypeUrl { get; set; }

        [PageTypeProperty(Type = typeof(PropertyString), Required = true,
            EditCaption = "Alternative text for logotype", Tab = typeof(GlobalContentSettings))]
        public virtual string LogotypeAlternativeText { get; set; }

        [PageTypeProperty(Type = typeof(PropertyString), Required = true,
            EditCaption = "Title suffix", Tab = typeof(GlobalContentSettings))]
        public virtual string TitleSuffix { get; set; }

        public override string Title
        {
            get { return TitleSuffix; }
        }
    }
}
